package org.jsola.hr.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.entity.EmpInfoDO;

import java.util.ArrayList;
import java.util.List;

import static org.jsola.hr.example.DepInfoExample.*;
import static org.jsola.hr.example.DepInfoExample.E_EMP_CHILDREN_COUNT;

/**
 * @author meng
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DepEmpInfoDTO extends BaseDTO {
    private String depId;
    private String parentId;
    private String depName;
    private Integer level;

    private Integer type;
    private Boolean virural;
    private String leader;
    private Integer addressId;
    private String address;
    private String desc;

    @ApiModelProperty(notes = N_EMP_DIRECT_COUNT, example = E_EMP_DIRECT_COUNT)
    private Integer empDirectCount;

    @ApiModelProperty(notes = N_EMP_CHILDREN_COUNT, example = E_EMP_CHILDREN_COUNT)
    private Integer empChildrenCount;

    private List<EmpInfoDO> empInfoDOList;
    private List<DepEmpInfoDTO> childList = new ArrayList<>();

    public void addChildList(DepEmpInfoDTO depEmpInfoDTO) {
        childList.add(depEmpInfoDTO);
    }
}
